package com.qf.service.impl;

import com.qf.dao.MindfulnessDao;
import com.qf.entity.Mindfulness;
import com.qf.service.MindfulnessService;
import com.qf.vo.R;
import org.apache.ibatis.annotations.Select;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.yaml.snakeyaml.events.Event;

import java.util.List;

/**
 * 正念语句列表(Mindfulness)表服务实现类
 *
 */
@Service("mindfulnessService")
public class MindfulnessServiceImpl implements MindfulnessService {

    @Autowired
    private  MindfulnessDao mindfulnessDao;


    /**
     * 查询所有的正念语句
     * @return
     */
    public R selectByAll() {

        List<Mindfulness> list=mindfulnessDao.selectByAll();
        if (list.size()>0){
            return R.ok(list);
        }
        return R.fail("添加失败");
    }
}

